<header>
  <div
    id="notice_wrap"
    style="
      display: none;
      background: #000;
      padding: 10px 20px;
      position: relative;
      overflow: hidden;
      color: #fff;
      font-size: 14px;
      white-space: nowrap;
    "
  >
    <marquee
      direction="left"
      behavior="scroll"
      scrollamount="8"
      loop="-1"
      onmouseout="this.start()"
      onmouseover="this.stop()"
    >
      为响应国家“净网2020”行动，我司将严格按照国家规定，提高审核要求，关闭涉嫌违纪的应用，请用户自行排查删除不合规的应用。6月1日起将整体审查应用，违规应用处理方法：1、金融类应用，域名必须备案，备案公司必须有相关资质；2、赌博、彩票应用，直接删除；3、黄色应用，直接删除；4、技术手段屏蔽我方审查，直接删除；注：APP被禁删除之后所有费用用户自行承担！
    </marquee>
  </div>

  <div class="container123">
    <div class="header clearfix" style="min-height: 70px">
      <a class="header-left block fl" href="javascript:;">
        <!-- <img src="./static/logo-top.png" class="img-responsive" /> -->
        <img src="./static/phone-logo.png" class="img-responsive hidden-xs" />
        <span class="tip-title">国内领先的应用服务平台</span>
      </a>
      <div class="phone-nav-wrap">
        <!-- <a class="header-left block fl" href="javascript:;">
          <img
            src="./static/phone-logo.png"
            class="img-responsive"
          />
        </a> -->

        <div class="login-in" style="display: block;">
            <!-- <a href="/notice/lists" class="notification fl login-no">
                <img class="iconfont icon-msg" src="//sres.dbqapp.com/static/edition/common/icon_lingdang.png?33496582">
                <span class="ms-badge"></span>
            </a> -->
            
            <div class="login-user clearfix fl">
                <span class="fl user-name">leo2</span>
                <!-- <a class="visible-xs fl logout1" href="/user/logout">退出</a> -->
                <span class="iconfont icon-arrow-bottom fl hidden-xs"></span>
                <div class="user-wrap">
                    <dl>
                        <dt><a href="javascript:;" id="logout"><span class="iconfont icon-sign-out"></span>退出</a></dt>
                    </dl>
                </div>
            </div>
        </div>

        <ul class="login clearfix fr login-no">
          <li class="ms-btn ms-btn-default">
            <a href="./login.html" style="color: #000 !important;">注册/登录</a>
          </li>
          <!-- <li>
                  <a
                    href="./login.html"
                    class="ms-btn ms-btn-primary ml10"
                    >登录</a
                  >
                </li> -->
        </ul>
        <ul class="ms-nav fr">
          <li class="active">
            <a
              href="javascript:;"
              id="home"
              onclick="switchTab('home')"
              title="首页"
              >首页</a
            >
          </li>

          <li class="">
            <a
              href="javascript:;"
              id="InternalTestRelease"
              onclick="switchTab('InternalTestRelease')"
              title="大众云盘"
              >大众云盘</a
            >
          </li>
          <li class="">
            <a
              href="javascript:;"
              id="tfSign"
              onclick="switchTab('tfSign')"
              title="TF签名"
              >TF签名</a
            >
          </li>
          
          <li class="sign-li">
            <a
              href="javascript:;"
              id="mySign"
              onclick="switchTab('mySign')"
              title="企业签名"
              >企业签名</a
            >
          </li>
          <li class="">
            <a
              href="javascript:;"
              id="servicePrice"
              onclick="switchTab('servicePrice')"
              title="服务价格"
              >服务价格</a
            >
          </li>
          <li class="">
            <a
              href="javascript:;"
              id="appPackage"
              onclick="switchTab('appPackage')"
              title="应用封装"
              >应用封装</a
            >
          </li>
        </ul>
      </div>
      <!-- <span class="icon-menu iconfont phone-menu"></span> -->
      <div class="phone-shadow"></div>
    </div>
  </div>
</header>

<script>

  $(function(){
    var token = localStorage.getItem('token');
    if(token){
      $('.login-no').hide();
      $('.login-user').show();
      $('.user-name').text(localStorage.getItem("user"));
    }else{
      $('.login-no').show();
      $('.login-user').hide();
    }
  })

  // 退出
  $("#logout").click(function () {
    $.ajax({
      type: "POST",
      url: baseUrl + "/logout",
      dataType: 'json',
      // data: JSON.stringify({ mobile: user }),
      headers: { 
          'authorization': localStorage.getItem('token'),
          'Content-Type': 'application/json'  //multipart/form-data;boundary=--xxxxxxx   application/json
      }, 
      success: function(data){
        if (data.code != 200) {
          alert(data.data);
        } else {
          localStorage.clear();
          switchTab('home');
          window.location.href = '/';
          
        }
      }
    });
  });
  
  
  var pageId = window.sessionStorage.getItem('pageId');
  pageId ? switchTab(pageId) : '';

  function switchTab(id, type) {
    $(".ms-nav li").removeClass("active");
    $("#" + id)
      .parent()
      .addClass("active");
    var param = '';

    if(id === 'servicePriceDetail' && window.sessionStorage.getItem('type') !== 'undefined'){

    }else{
      window.sessionStorage.setItem('type', type);

    }

    $("#con").load("./" + id + ".html" + param);

    window.sessionStorage.setItem('pageId', id); // 保存页面ID

    let arr = [
      "InternalTestReleaseInner",
      "InternalTestReleaseInnerUpload",
      "mySignInner",
      "uploadApple",
      "tfSignInner",
      "tfSignInnerUpload",
      "appPackageInner",
      "appPackageInnerUpload",
    ];
    if (arr.indexOf(id) > -1) {
      $("#footer").hide();
      if (id === "InternalTestReleaseInner") {
        id = "InternalTestRelease";
      }
      if (id === "InternalTestReleaseInnerUpload") {
        id = "InternalTestRelease";
      }
      if (id === "mySignInner") {
        id = "mySign";
      }
      if (id === "uploadApple") {
        id = "mySign";
      }
      if (id === "tfSignInner") {
        id = "tfSign";
      }
      if (id === "tfSignInnerUpload") {
        id = "tfSign";
      }
      if (id === "appPackageInner") {
        id = "appPackage";
      }
      if (id === "appPackageInnerUpload") {
        id = "appPackage";
      }

      $("#" + id)
        .parent()
        .addClass("active");
    } else {
      $("#footer").show();
    }
  }

  // $("#InternalTestRelease").click(function(){
  //   $(".ms-nav li").removeClass('active')
  //   $("#InternalTestRelease").parent().addClass('active')
  //   $("#con").load("./InternalTestRelease.html");
  // })
  // $("#webSwitch").click(function(){
  //   $(".ms-nav li").removeClass('active')
  //   $("#webSwitch").parent().addClass('active')
  //   $("#con").load("./home.html");
  // })
</script>


<script src="https://codecdn.birdfast.com/qiniu.min.js"></script>
